<?php
/**
 * Created by JetBrains PhpStorm.
 * User: Đặng Khánh Trung
 * Date: 10/29/12
 * Time: 10:10 AM
 * To change this template use File | Settings | File Templates.
 */
// No direct access.
defined('_JEXEC') or die;
JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('behavior.mootools');

JLoader::register('MucChon', JPATH_COMPONENT . '/helpers/mucchon.php');

$document = JFactory::getDocument();
$document->addStyleSheet(JURI::base() . 'components/com_vast/assets/css/admin_ui.css');
$document->addStyleSheet(JURI::base() . 'components/com_vast/assets/css/admin_menu.css');
$document->addStyleSheet(JURI::base() . 'components/com_vast/assets/css/admin.styles.css');
$document->addStyleSheet(JURI::base() . 'components/com_vast/assets/css/toolbar_images.css');
$document->addStyleSheet(JURI::base() . 'components/com_vast/assets/css/menu_images.css');

$document->addStyleSheet(JURI::root() . 'components/com_vast/assets/css/chosen.css');
$document->addStyleSheet(JURI::root() . 'components/com_vast/assets/css/vtip.css');
$document->addStyleSheet(JURI::root() . 'components/com_vast/assets/js/fancybox/jquery.fancybox-1.3.4.css');

$document->addScript(JURI::root() . 'components/com_vast/assets/js/jquery.min.js');
$document->addScript(JURI::root() . 'components/com_vast/assets/js/jquery-ui.min.js');
$document->addScript(JURI::root() . 'components/com_vast/assets/js/jquery.ui.autocomplete.html.js');
$document->addScript(JURI::root() . 'components/com_vast/assets/js/jquery.noConflict.js');
$document->addScript(JURI::root() . 'components/com_vast/assets/js/vmsite.js');
$document->addScript(JURI::root() . 'components/com_vast/assets/js/fancybox/jquery.mousewheel-3.0.4.pack.js');
$document->addScript(JURI::root() . 'components/com_vast/assets/js/fancybox/jquery.easing-1.3.pack.js');
$document->addScript(JURI::root() . 'components/com_vast/assets/js/fancybox/jquery.fancybox-1.3.4.pack.js');
$document->addScript(JURI::base() . 'components/com_vast/assets/js/jquery.coookie.js');
$document->addScript(JURI::root() . 'components/com_vast/assets/js/chosen.jquery.min.js');
$document->addScript(JURI::base() . 'components/com_vast/assets/js/vm2admin.js');

$document->addScriptDeclaration('
		var tip_image=\'/joomla/components/com_virtuemart/assets/js/images/vtip_arrow.png\';
		var vm2string ={ editImage: \'edit image\',select_all_text: \'select all options\',select_some_options_text :\'Select some Options\', select_an_option_text:\'Select an Option\'} ;
		 jQuery( function($) {

			$(\'dl#system-message\').hide().slideDown(400);
			$(\'.virtuemart-admin-area .toggler\').vm2admin(\'toggle\');
			$(\'#admin-ui-menu\').vm2admin(\'accordeon\');
			if ( $(\'#admin-ui-tabs\').length  ) {
				$(\'#admin-ui-tabs\').vm2admin(\'tabs\',virtuemartcookie).find(\'select\').chosen({enable_select_all: true,select_all_text : vm2string.select_all_text,select_some_options_text:vm2string.select_some_options_text});
			}

			$(\'#content-box [title]\').vm2admin(\'tips\',tip_image);
			$(\'.modal\').fancybox();
			$(\'.reset-value\').click( function(e){
                e.preventDefault();
                none = \'\';
                jQuery(this).parent().find(\'.ui-autocomplete-input\').val(none);

            });

		});

		var virtuemartcookie="virtuemart";

');

?>

<div class="virtuemart-admin-area">
    <?php 
        $mucchon = new MucChon();
        echo $mucchon->layMucChon();
    ?>

<div id="admin-content-wrapper">
    <div class="toggler vmicon-show"></div>
    <div id="admin-content" class="admin-content">

        <form id="adminForm"
              action="<?php echo JRoute::_('index.php?option=com_vast&layout=edit&id=' . $this->item->id); ?>"
              name="adminForm" method="post">
            <div id="admin-ui-tabs">
                <div class="tabs" title="<?php echo JText::_('COM_VAST_HOCHAM_INFO'); ?>">
                    <table class="adminform">
                        <tr>
                            <td valign="top" colspan="2">
                                <fieldset>
                                    <legend><?php echo JText::_('COM_VAST_HOCHAM_DETAIL'); ?></legend>
                                    <table width="100%" border="0">
                                        <tr>
                                            <td><?php echo $this->form->getLabel('id'); ?></td>
                                            <td><?php echo $this->form->getInput('id'); ?></td>
                                        </tr>
                                        <tr>
                                            <td><?php echo $this->form->getLabel('ten'); ?></td>
                                            <td><?php echo $this->form->getInput('ten'); ?></td>
                                        </tr>
                                        <tr>
                                            <td><?php echo $this->form->getLabel('mota'); ?></td>
                                            <td><?php echo $this->form->getInput('mota'); ?></td>
                                        </tr>
                                        <tr>
                                            <td><?php echo $this->form->getLabel('thutu'); ?></td>
                                            <td><?php echo $this->form->getInput('thutu'); ?></td>
                                        </tr>
                                    </table>
                                </fieldset>
                            </td>
                        </tr>
                    </table>
                </div>
                <div class="clear"></div>
                <div class="tabs" title="Bổ sung">

                </div>
            </div>
            <div>
                <input type="hidden" name="task" value="hocham.edit"/>
                <input type="hidden" name="return" value="<?php echo JRequest::getCmd('return');?>"/>
                <?php echo JHtml::_('form.token'); ?>
            </div>
        </form>
    </div>
</div>
</div>